<div class="page-header">
    <h3>- Administration de la classe <?php echo $class_info->id ?>-</h3>
</div>
<div>
    <div style="float:left;">
        <?php if ($class_info->students_nb > 0) { ?>

            <table>
                <thead>
                    <tr>
                        <th>Nom</th>
                        <th>Prenom</th>
                    </tr>
                </thead>
                <?php
                foreach ($classStudents as $stud){
                ?>
                <tr>
                    <td><?php echo $stud->lastname ?></td>
                    <td><?php echo $stud->firstname ?></td>
                    <td><?php echo anchor('/classes/deleteStudent/'.$class_info->id.'/'.$stud->id, 'retirer de cette classe') ?></td>
                </tr>
                <?php
                }
                ?>
            </table>
        <?php } else {
            echo '<span>Aucun eleve n\'est inscrit dans cette classe</span>';
        } ?>
    </div>
    <div style="margin-left: 70%;">
        <span>Inscrire des eleves</span>
<?php
        /* Informations pôur le formulaires eleves*/
        $submit = array('id'=>'submit', 'name' => 'submit', 'value' => 'Inscrire');
        $student_list = array();
        foreach($freeStudents as $freeStud){
            $student_list[$freeStud->id] = $freeStud->lastname.' '.$freeStud->firstname;
        }
        if (count($student_list) > 0) {
        echo form_open($this->uri->uri_string());
        ?>
        <p>
    <span class="form-inline">
        <?php echo form_dropdown("student[]", $student_list, array('', '')); ?>
    </span>
        </p>
        <p><?php echo form_submit($submit); ?></p>
     <?php } else {
            echo '<br /><span>Aucun etudiant disponible</span>';
        } ?>
    </div>
    <div style="clear:both;" />
</div>